package com.cershy.chatroomserver.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cershy.chatroomserver.entity.Group;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface GroupMapper extends BaseMapper<Group> {

    @Select("SELECT * FROM `group`")
    List<Group> selectAll();

    @Select("SELECT * FROM `group` WHERE name = #{name}")
    Group selectByName(String name);

}

